<!DOCTYPE html>
<html>
<head>
    <title>设备表</title>
		<#include "/header.html">
		<style type="text/css">
			.form-control2 {
			    height: 30px;
			}
		</style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("device:device:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("device:device:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("device:device:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
					<!-- <div class="form-group">
                        <div class="col-sm-2 control-label">设备名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.deviceName" placeholder="设备名称"/>
                        </div>
                    </div> -->
                    <div class="form-group">
                        <div class="col-sm-2 control-label">设备ID</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.deviceId" placeholder="设备ID"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">IMEI</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.imei" placeholder="IMEI"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">大楼编号</div>
                        <!-- <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.buildingCode" placeholder="大楼编号"/>
                        </div> -->
                        
		                    <select name="province" id="province" v-model="s1.province" class="form-control2"
		                            placeholder="省" @change="s1getCity">
		                        <option value="">所有</option>
		                        <option v-for="item in s1.provinces" :value="item">{{item}}</option>
		                    </select>
		
		                    <select name="city" id="city" v-model="s1.city" class="form-control2"
		                            placeholder="市" @change="s1getCountry">
		                        <option value="">所有</option>
		                        <option v-for="item in s1.cities" :value="item">{{item}}</option>
		                    </select>
		                    
		                    <select name="town" id="town" v-model="s1.country" class="form-control2"
		                            placeholder="县" @change="s1getBuilding">
		                        <option value="">所有</option>
		                        <option v-for="item in s1.countries" :value="item">{{item}}</option>
		                    </select>
		
		                    <!-- <select class="form-control2" v-model="s1.buildingName" placeholder="楼名" @change="s1getBuilding">
		                        <option value="">所有</option>
		                        <option v-for="item in s1.buildings" :value="item">{{item}}</option>
		                    </select> -->
		                    <select class="form-control2" v-model="buildingName" placeholder="楼名">
		                        <option value="">所有</option>
		                        <option v-for="item in s1.buildings" :value="item">{{item}}</option>
		                    </select>

                    </div>
                    
                    
				    <div class="form-group">
                        <div class="col-sm-2 control-label">楼层</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.buildingFloor" placeholder="楼层"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.buildingRoom" placeholder="号"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <!-- <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.status" placeholder="状态  0：运行   1：解绑"/>
                        </div> -->
                        <label class="radio-inline">
							<input type="radio" name="device.status" value="1" v-model="device.deviceStatus"/> 解绑
						</label>
						<label class="radio-inline">
							<input type="radio" name="device.status" value="0" v-model="device.deviceStatus"/> 运行
						</label>
                    </div>
					<!-- <div class="form-group">
                        <div class="col-sm-2 control-label">创建时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="device.createTime" placeholder="创建时间"/>
                        </div>
                    </div> -->
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/device/device.js?_${.now?long}"></script>
</body>
</html>